<?php
if (!defined('IN_IA')) {
    exit('Access Denied');
}
class Welian_Indiana_Detail {
    function getOrderDetailByOrderId($orderId){
        global $_W;
        $condition =  "and uniacid = :uniacid";
        $params = array(':uniacid' => $_W['uniacid'] , ':orderId' => $orderId);
        $sql = "SELECT * FROM " . tablename('ew_delivery_order_detail') . " where 1 {$condition} and orderId= :orderId";
        $details = pdo_fetchall($sql, $params);
        return $details;
    }

    function getOrderDetailById($id){
        global $_W;
        $condition =  "and uniacid = :uniacid";
        $params = array(':uniacid' => $_W['uniacid']);
        $sql = "SELECT * FROM " . tablename('ew_delivery_order_detail') . " where 1 {$condition} and id='{$id}'";
        $detail = pdo_fetch($sql, $params);
        return $detail;
    }

}
